package org.shijiagen.clients;

import org.shijiagen.param.ProductSearchParam;
import org.shijiagen.pojo.Product;
import org.shijiagen.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "search-service", url = "http://localhost:3007")
public interface SearchClient {

    @PostMapping("search/product")
    R searchProduct(@RequestBody ProductSearchParam productSearchParam);

    @PostMapping("search/save")
    R saveProduct(@RequestBody Product product);

    @PostMapping("search/remove")
    R removeProduct(@RequestBody Product product);
}
